package com.example.xuanke.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.xuanke.Entity.CourseEntity;
import com.example.xuanke.commton.Wrapper;
import com.example.xuanke.mapper.CourseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseSerivce {
    @Autowired
    private CourseMapper courseMapper;


    public Wrapper<List<CourseEntity>> getAllCourse() {

        // 查询课程列表
        List<CourseEntity> courseList = courseMapper.selectList(null);

        // 返回封装的结果
        return new Wrapper<>(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, courseList);
    }



    }
